#ifndef GLOBAL_DATA_H_
#define GLOBAL_DATA_H_

/* ~~~~~~~~~~~~~~~~~~~~~~~   Global data   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#include <string>
#include "remote_party.h"


#define BACK_LOG			6
/* Size of the message */
#define	MESS_SIZE			1000

enum line_type { 
	UNKNOWN = 0,
	LOCAL = 1, 
	REMOTE = 2
};

struct address_struct {
	std::string			ip;
	int					port;
};
typedef struct address_struct address_t;


typedef struct global_struct {

	/* Local ip address and port */
	address_t			local_addr;
	
	char*				file_name;

	remote_cli_list		list_of_clients;
	remote_srv_list		list_of_servers;
	
	/* all received messages are stored in this buffer */
	buff_t				recv_buff;		
	/* messages that will be sent to remote parties */
	buff_t				cli_send_buff;
	//buff_t				srv_send_buff;

	bool				quit_flag;

}global_s;
extern global_s global;


#endif /*GLOBAL_DATA_H_*/
